package cn.falcon.fmobi.console.requestparam;

import cn.falcon.fmobi.biz.common.Constant;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * 数据报告 查询参数
 *
 * @author yujuan.zhang
 * @from 2017-10-23
 * @since V1.0
 */
public class ReportParam {

    /**
     * 广告主id
     */
    private Integer advertiserId;

    /**
     * 订单id
     */
    private Integer campaignId;

    /**
     * 策略id
     */
    private Integer strategyId;

    /**
     * 数据报告查询-开始时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date startDate;

    /**
     * 数据报告查询-结束时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date endDate;

    public Integer getAdvertiserId() {
        return advertiserId;
    }

    public void setAdvertiserId(Integer advertiserId) {
        this.advertiserId = advertiserId;
    }

    public Integer getCampaignId() {
        return campaignId;
    }

    public void setCampaignId(Integer campaignId) {
        this.campaignId = campaignId;
    }

    public Integer getStrategyId() {
        return strategyId;
    }

    public void setStrategyId(Integer strategyId) {
        this.strategyId = strategyId;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public Map<String, Object> getSearchMap() {
        Map<String, Object> map = new HashMap<>();
        map.put("advertiserId", advertiserId);
        map.put("startDate", startDate);
        map.put("endDate", endDate);
        map.put("platformId", Constant.PLATFORM_ID_TENCENT);
        return map;
    }
}
